import string
if __name__ == "__main__":
    result = {}
    with open("./Tensorflow_Zufe_Codes/Homework1/Romeo_and_Juilet.txt", "rt") as f:
        str = f.read()
        str = str.lower()
        for i in string.punctuation:
            if (i != '\''):
                str = str.replace(i, ' ')
        wordlist = str.split()
        result = {i: wordlist.count(i) for i in wordlist}
    result['作者'] = '吴棋凡'
    print(result)
